<template>
    <div>
        <!-- <MyEditor></MyEditor> -->
        {{post.content}}
        <div style="margin: 10px 10px 0 20px;width: 80%">
            <Form ref="post" :model="post" :rules="postRules" label-position="left" :label-width="100">
                <Form-Item label="标题:" prop="title">
                    <Input v-model="post.title" placeholder="请输入标题" />
                </Form-Item>
                <Form-Item label="内容:" prop="content">
                    <MyEditor ref='myEditor' v-model="post.content">
                    </MyEditor>

                </Form-Item>
            </Form>
            <br><br>
        </div>
    </div>
</template>
<script>
import MyEditor from '@/lib/editor/myEditor';
// import { MyEditor } from '@/components/post/myEditor';  错误
export default {
    components:{
        MyEditor
    },
    data(){
        return {
            post:{
                title: '',
                content: '',
            },
            postRules: {
                title:[
                    {required: true,message:"请输入标题",trigger: 'blur'},
                ],
            },
        }
    }
}
</script>

<style  scoped>

</style>